﻿namespace StockAccessors.Interdin.Model
{
	internal class DetailsLink
	{
		#region Constants

		private const string Url = "https://www.interdinfuturos.com/Broker/Ops/FichaContratoJS.asp?nc={0}&IP={1}&YY={2}&M={3}&St={4}&CC={5} ";

		#endregion

		#region Properties

		public int ContractNumber { get; private set; }
		public int IP { get; private set; }
		public int Year { get; private set; }
		public int Month { get; private set; }
		public string St { get; private set; }
		public string Symbol { get; private set; }

		#endregion

		#region Public Methods

		public DetailsLink(int contractNumber, int ip, int year, int month, string st, string symbol)
		{
			this.Symbol = symbol;
			this.St = st;
			this.Month = month;
			this.Year = year;
			this.IP = ip;
			this.ContractNumber = contractNumber;
		}

		public string GetLinkUrl()
		{
			return string.Format(DetailsLink.Url, this.ContractNumber, this.IP, this.Year, this.Month.ToString("00"), this.St, this.Symbol);
		}

		#endregion

	}
}
